home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / gnu / gawk_2_15_5.lha / gawk-2.15.5 / SMakefile < prev   
Makefile  |  1995-04-17  |  8KB  |  282 lines

  1. # Makefile for GNU Awk.
  2. #
  3. # Copyright (C) 1986, 1988-1993 the Free Software Foundation, Inc.
  4. # This file is part of GAWK, the GNU implementation of the
  5. # AWK Progamming Language.
  6. # GAWK is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. # GAWK is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GAWK; see the file COPYING.  If not, write to
  16. # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # User tunable macros -- CHANGE THESE IN Makefile.in RATHER THAN IN 
  19. # Makefile, OR configure WILL OVERWRITE YOUR CHANGES
  20.  
  21. prefix = Programmer:other
  22. exec_prefix = $(prefix)
  23. binprefix =
  24. manprefix =
  25.  
  26. bindir = $(exec_prefix)/bin
  27. libdir = $(exec_prefix)/lib
  28. mandir = $(prefix)/man/man1
  29. manext = .1
  30. infodir = $(prefix)/info
  31.  
  32. #    The provided "configure" is used to turn a config file (samples in
  33. #    the "config" directory into commands to edit config.in into
  34. #    a suitable config.h and to edit Makefile.in into Makefile.
  35. #    To port GAWK, create an appropriate config file using the ones in
  36. #    the config directory as examples and using the comments in config.in
  37. #    as a guide.
  38.  
  39. CC = sc
  40. SED = sed
  41. WMERGE = wmerge
  42. ##MAKE_CC## CC = cc
  43.  
  44. PROFILE=    #-pg
  45. DEBUG=        #-DMALLOCDEBUG #-DDEBUG #-DFUNC_TRACE #-DMPROF
  46. LINKSTATIC=    #-Bstatic
  47. WARN=        #-W -Wunused -Wimplicit -Wreturn-type -Wcomment    # for gcc only
  48.  
  49. # Parser to use on grammar - any one of the following will work
  50. PARSER = bison -y
  51. #PARSER = yacc
  52. #PARSER = byacc
  53.  
  54. # Set LIBS to any libraries that are machine specific
  55. LIBS = math=standard
  56.  
  57. # Cray 2 running Unicos 5.0.7
  58. ##MAKE_LIBNET## LIBS = -lnet
  59.  
  60.  
  61. # Systems with alloca in /lib/libPW.a
  62. ##MAKE_ALLOCA_PW## LIBS = -lPW
  63.  
  64. # ALLOCA - only needed if you use bison
  65. #    Set equal to alloca.o if your system is S5 and you don't have
  66. #    alloca. Uncomment one of the rules below to make alloca.o from
  67. #    either alloca.s or alloca.c.
  68. #    This should have already been done automatically by configure.
  69. #
  70. #    Some systems have alloca in libPW.a, so LIBS=-lPW may work, too.
  71. ALLOCA= ansialloca.o
  72. ##MAKE_ALLOCA_S## ALLOCA= alloca.o
  73.  
  74. VFLAGS=
  75.  
  76. # VMS POSIX, VAXC V3.2
  77. ##MAKE_VMS-Posix## VFLAGS = -UVMS -D__STDC__=0
  78.  
  79. # HP/Apollo running cc version 6.7 or earlier
  80. ##MAKE_Apollo## VFLAGS = -U__STDC__ -A run,sys5.3
  81. ##MAKE_Apollo## LIBS = -A sys,any
  82.  
  83. # SGI IRIX 4.0.5 cc flags
  84. ##MAKE_SGI## VFLAGS = -cckr
  85.  
  86. ##MAKE_NeXT## VFLAGS = -DGFMT_WORKAROUND
  87.  
  88. CFLAGS = UNSIGNEDCHAR OPTIMIZE STACKEXTEND NOICONS
  89. FLAGS = define=_STRICT_ANSI define=GAWK define=HAVE_CONFIG_H $(VFLAGS) $(DEBUG) $(PROFILE) $(WARN)
  90. LDFLAGS = $(LINKSTATIC) $(PROFILE) NOICONS
  91.  
  92. .c.o:
  93.     $(CC) $(CFLAGS) $(FLAGS) $<
  94.  
  95. # object files
  96. AWKOBJS = ansimain.o ansieval.o ansibuiltin.o ansimsg.o ansiiop.o ansiio.o \
  97.     ansifield.o ansiarray.o ansinode.o version.o ansimissing.o ansire.o \
  98.     ansigetopt.o getopt1.o
  99.  
  100. ALLOBJS = $(AWKOBJS) ansiawktab.o
  101.  
  102. # GNUOBJS
  103. #    GNU stuff that gawk uses as library routines.
  104. GNUOBJS= ansiregex.o ansidfa.o $(ALLOCA)
  105.  
  106. # source and documentation files
  107. SRC =    main.c eval.c builtin.c msg.c version.c \
  108.     iop.c io.c field.c array.c node.c missing.c re.c getopt.c getopt1.c
  109.  
  110. ALLSRC= $(SRC) awktab.c
  111.  
  112. AWKSRC= awk.h awk.y $(ALLSRC) patchlevel.h protos.h config.in getopt.h
  113.  
  114. GNUSRC = alloca.c alloca.s dfa.c dfa.h regex.c regex.h
  115.  
  116. COPIES = missing/system.c missing/tzset.c \
  117.     missing/memcmp.c missing/memcpy.c missing/memset.c \
  118.     missing/random.c missing/strncasecmp.c missing/strchr.c \
  119.     missing/strerror.c missing/strtod.c \
  120.     missing/strftime.c missing/strftime.3 
  121.  
  122. SUPPORT = support/texindex.c support/texinfo.tex
  123.  
  124. DOCS= gawk.1 gawk.texi
  125.  
  126. TEXFILES= gawk.aux gawk.cp gawk.cps gawk.fn gawk.fns gawk.ky gawk.kys \
  127.        gawk.pg gawk.pgs gawk.toc gawk.tp gawk.tps gawk.vr gawk.vrs
  128.  
  129. MISC =    NEWS COPYING FUTURES Makefile.* PROBLEMS README* PORTS POSIX \
  130.     mungeconf configure ACKNOWLEDGMENT LIMITATIONS INSTALL
  131.  
  132. OTHERS= pc/* atari/* vms/*
  133.  
  134. ALLDOC= gawk.dvi $(TEXFILES) gawk.info*
  135.  
  136. # Release of gawk.  There can be no leading or trailing white space here!
  137. REL=2.15
  138.  
  139. # rules to build gawk
  140. gawk:    $(ALLOBJS) $(GNUOBJS) $(REOBJS)
  141.     $(CC) link to gawk $(LDFLAGS) $(ALLOBJS) $(GNUOBJS) $(REOBJS) $(LIBS)
  142.  
  143. $(AWKOBJS) ansiregex.o ansidfa.o:    ansiawk.h dfa.h regex.h
  144.  
  145. ansigetopt.o:    getopt.h
  146.  
  147. getopt1.o:    getopt.h
  148.  
  149. ansimain.o: ansimain.c
  150. ansimain.c: main.c main.ch patchlevel.h
  151.     $(WMERGE) main.c main.ch ansimain.c
  152.  
  153. ansiawktab.o: ansiawktab.c
  154. ansiawktab.c:    ansiawk.y
  155.     $(PARSER) -v ansiawk.y
  156. ##MAKE_VMS-Posix##     mv ytab.c awktab.c
  157. ##MAKE_VMS-Posix## dummy.awk_tab.target:
  158.     $(SED) "/^extern char .malloc(), .realloc();$$/d" y.tab.c >ansiawktab.c
  159.     delete y.tab.c y.output
  160.  
  161. ansiawk.y: awk.y awk.ych
  162.     $(WMERGE) awk.y awk.ych ansiawk.y
  163.  
  164. ansiawktab.o:    ansiawk.h
  165.  
  166. config.h:    config.in config.hch
  167.     $(WMERGE) config.in config.hch config.h
  168. #    @echo You must provide a config.h!
  169. #    @echo Run \"./configure\" to build it for known systems
  170. #    @echo or copy config.in to config.h and edit it.; exit 1
  171.  
  172. install:    gawk
  173.     copy gawk $(bindir)
  174.  
  175. # ALLOCA: uncomment this if your system (notably System V boxen)
  176. # does not have alloca in /lib/libc.a or /lib/libPW.a
  177. #
  178. # If your machine is not supported by the assembly version of alloca.s,
  179. # use the C version which follows instead.  It uses the default rules to
  180. # make alloca.o.
  181. #
  182. # One of these rules should have already been selected by running configure.
  183.  
  184.  
  185. ##MAKE_ALLOCA_S## alloca.o:    alloca.s
  186. ##MAKE_ALLOCA_S##     /lib/cpp < alloca.s | $(SED) '/^#/d' > t.s
  187. ##MAKE_ALLOCA_S##     as t.s -o alloca.o
  188. ##MAKE_ALLOCA_S##     rm t.s
  189.  
  190. alloca.o:    alloca.c
  191.  
  192. # auxiliary rules for release maintenance
  193. lint:    $(ALLSRC)
  194.     lint -hcbax $(FLAGS) $(ALLSRC)
  195.  
  196. xref:
  197.     cxref -c $(FLAGS) $(ALLSRC) | grep -v '    /' >xref
  198.  
  199. clean:
  200.     -delete \#?.(bak|o|lnk) ansi\#?
  201.  
  202. veryclean: clean
  203.     -delete gawk
  204.  
  205. gawk.dvi:    gawk.texi
  206.     copy support/texinfo.tex .
  207.     tex gawk.texi; texindex gawk.??
  208.     tex gawk.texi; texindex gawk.??
  209.     tex gawk.texi
  210.     rm -f texinfo.tex
  211.  
  212. gawk.info:    gawk.texi
  213.     makeinfo gawk.texi
  214.  
  215. test:    gawk
  216.     cd test; make -k
  217.  
  218. check:    test
  219.  
  220. ansiawk.h: awk.h awk.hch
  221.     $(WMERGE) awk.h awk.hch ansiawk.h
  222.  
  223. ansimsg.o: ansimsg.c ansiawk.h
  224. ansimsg.c: msg.c msg.ch
  225.     $(WMERGE) msg.c msg.ch ansimsg.c
  226.  
  227. ansieval.o: ansieval.c ansiawk.h
  228. ansieval.c: eval.c eval.ch
  229.     $(WMERGE) eval.c eval.ch ansieval.c
  230.  
  231. ansibuiltin.o: ansibuiltin.c ansiawk.h
  232. ansibuiltin.c: builtin.c builtin.ch
  233.     $(WMERGE) builtin.c builtin.ch ansibuiltin.c
  234.  
  235. ansiiop.o: ansiiop.c ansiawk.h
  236. ansiiop.c: iop.c iop.ch
  237.     $(WMERGE) iop.c iop.ch ansiiop.c
  238.  
  239. ansiio.o: ansiio.c ansiawk.h
  240. ansiio.c: io.c io.ch
  241.     $(WMERGE) io.c io.ch ansiio.c
  242.  
  243. ansifield.o: ansifield.c ansiawk.h
  244. ansifield.c: field.c field.ch
  245.     $(WMERGE) field.c field.ch ansifield.c
  246.  
  247. ansiarray.o: ansiarray.c ansiawk.h
  248. ansiarray.c: array.c array.ch
  249.     $(WMERGE) array.c array.ch ansiarray.c
  250.  
  251. ansinode.o: ansinode.c ansiawk.h
  252. ansinode.c: node.c node.ch
  253.     $(WMERGE) node.c node.ch ansinode.c
  254.  
  255. ansimissing.o: ansimissing.c ansiawk.h
  256. ansimissing.c: missing.c missing.ch
  257.     $(WMERGE) missing.c missing.ch ansimissing.c
  258.  
  259. ansire.o: ansire.c ansiawk.h
  260. ansire.c: re.c re.ch
  261.     $(WMERGE) re.c re.ch ansire.c
  262.  
  263. ansigetopt.o: ansigetopt.c
  264. ansigetopt.c: getopt.c getopt.ch
  265.     $(WMERGE) getopt.c getopt.ch ansigetopt.c
  266.  
  267. ansiregex.o: ansiregex.c
  268. ansiregex.c: regex.c regex.ch
  269.     $(WMERGE) regex.c regex.ch ansiregex.c
  270.  
  271. ansidfa.o: ansidfa.c
  272. ansidfa.c: dfa.c dfa.ch
  273.     $(WMERGE) dfa.c dfa.ch ansidfa.c
  274.  
  275. ansialloca.o: ansialloca.c
  276. ansialloca.c: alloca.c alloca.ch
  277.     $(WMERGE) alloca.c alloca.ch ansialloca.c
  278.